#include <bits/stdc++.h>

using namespace std;

vector<int> singleNumber(vector<int>& nums);

int main()
{
	return 0;
}

/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
vector<int> singleNumber(vector<int>& nums)
{
	int aux = 0;
	for (auto num: nums) aux ^= num;

	int ans = 0, tmp = aux;
	aux = aux & (~(unsigned)aux + 1);
	for(auto num: nums)
		if (num & aux) 	ans ^= num;

	return {ans, ans ^ tmp};
}
